package com.wangtongxiao.mapper;

import java.io.File;

public class MyIo1 {
    public static void main(String[] args) {
        String path = "d:\\作业";
        File file = new File(path);
        if (file.exists()&&file.isDirectory()){
            File[] files = file.listFiles();
            for (File file1 : files) {
                if (file1.isDirectory()) {
                    System.out.println("我是文件夹!!!"+file1.getAbsolutePath()+file1.getName());
                }
                else {
                    System.out.println("我是文件!!!"+file1.getName());

                }
            }
        }

    }
}
